package com.sq.partner.manager.dao.impl;
import com.sq.partner.manager.dao.PolicyVoDao;
import com.sq.partner.manager.util.Page;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class PolicyVoDaoImpl extends BaseDaoImpl implements PolicyVoDao {
    @Override
    public Page queryPolicyPageByCondition(Page page) throws Exception {
        Map<String,Object> map = (Map<String, Object>) page.getType();
        page.setTotal((Integer)this.query("queryCountByMap", map));
        page.setData(queryList("queryPolicyPageByCondition", map));
        return page;
    }

	@SuppressWarnings("unchecked")
	@Override
	public List<Map<String, Object>> queryPolicyByCondition(Map<String, String> map) throws Exception {
		return this.queryList("queryPolicyByCondition", map);
	}
}
